package com.talkology.pilot.database.model;

import java.io.Serializable;
import java.util.Date;

public class TalkSalonMgt implements Serializable {
    private Integer index;

    private String talkSalonName;

    private String subject;

    private String teacher;

    private Integer useCredit;

    private Integer useMoney;

    private Integer studentLimit;

    private Integer usedNum;

    private Date createdAt;

    private Date updatedAt;

    private static final long serialVersionUID = 1L;

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getTalkSalonName() {
        return talkSalonName;
    }

    public void setTalkSalonName(String talkSalonName) {
        this.talkSalonName = talkSalonName == null ? null : talkSalonName.trim();
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject == null ? null : subject.trim();
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher == null ? null : teacher.trim();
    }

    public Integer getUseCredit() {
        return useCredit;
    }

    public void setUseCredit(Integer useCredit) {
        this.useCredit = useCredit;
    }

    public Integer getUseMoney() {
        return useMoney;
    }

    public void setUseMoney(Integer useMoney) {
        this.useMoney = useMoney;
    }

    public Integer getStudentLimit() {
        return studentLimit;
    }

    public void setStudentLimit(Integer studentLimit) {
        this.studentLimit = studentLimit;
    }

    public Integer getUsedNum() {
        return usedNum;
    }

    public void setUsedNum(Integer usedNum) {
        this.usedNum = usedNum;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TalkSalonMgt other = (TalkSalonMgt) that;
        return (this.getIndex() == null ? other.getIndex() == null : this.getIndex().equals(other.getIndex()))
            && (this.getTalkSalonName() == null ? other.getTalkSalonName() == null : this.getTalkSalonName().equals(other.getTalkSalonName()))
            && (this.getSubject() == null ? other.getSubject() == null : this.getSubject().equals(other.getSubject()))
            && (this.getTeacher() == null ? other.getTeacher() == null : this.getTeacher().equals(other.getTeacher()))
            && (this.getUseCredit() == null ? other.getUseCredit() == null : this.getUseCredit().equals(other.getUseCredit()))
            && (this.getUseMoney() == null ? other.getUseMoney() == null : this.getUseMoney().equals(other.getUseMoney()))
            && (this.getStudentLimit() == null ? other.getStudentLimit() == null : this.getStudentLimit().equals(other.getStudentLimit()))
            && (this.getUsedNum() == null ? other.getUsedNum() == null : this.getUsedNum().equals(other.getUsedNum()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getIndex() == null) ? 0 : getIndex().hashCode());
        result = prime * result + ((getTalkSalonName() == null) ? 0 : getTalkSalonName().hashCode());
        result = prime * result + ((getSubject() == null) ? 0 : getSubject().hashCode());
        result = prime * result + ((getTeacher() == null) ? 0 : getTeacher().hashCode());
        result = prime * result + ((getUseCredit() == null) ? 0 : getUseCredit().hashCode());
        result = prime * result + ((getUseMoney() == null) ? 0 : getUseMoney().hashCode());
        result = prime * result + ((getStudentLimit() == null) ? 0 : getStudentLimit().hashCode());
        result = prime * result + ((getUsedNum() == null) ? 0 : getUsedNum().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", index=").append(index);
        sb.append(", talkSalonName=").append(talkSalonName);
        sb.append(", subject=").append(subject);
        sb.append(", teacher=").append(teacher);
        sb.append(", useCredit=").append(useCredit);
        sb.append(", useMoney=").append(useMoney);
        sb.append(", studentLimit=").append(studentLimit);
        sb.append(", usedNum=").append(usedNum);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}